from abc import ABCMeta, abstractmethod
class Animal(object):
    __metaclass__ = ABCMeta
    def __init__(self, name, age, cry):
        self._name = name
        self._age = age
        self._cry = cry
    @abstractmethod
    def getInfo(self):pass

class Cat(Animal):
    def __init__(self, name, age, cry):
        Animal.__init__(self, name, age, cry)
    def getInfo(self):
        print("The cat's information is below:\n" + "name:" + self._name + "\n age:" + str(self._age) + "\n cry: " + self._cry)

class Dog(Animal):
    def __init__(self, name, age, cry):
        Animal.__init__(self, name, age, cry)
    def getInfo(self):
        print("The dog's information is below:\n" + "name:" + self._name + "\n age:" + str(self._age) + "\n cry: " + self._cry)

if __name__ == '__main__':
    list = []
    c = Cat("Tom", 2, "miao")
    list.append(c)
    d = Dog("Hacke", 4, "wang")
    list.append(d)
    for i in range(len(list)):
        list[i].getInfo()